package org.huntaway.kindergarten.service.bi.student;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.huntaway.kindergarten.manager.StudentInfoMng;
import org.huntaway.kindergarten.po.StudentInfo;
import org.huntaway.kindergarten.service.KindProcessor;
import org.huntaway.kindergarten.util.GlobalCon;

public class StudentInfoService extends KindProcessor<StudentInfo> {
	public StudentInfoService() {
		super();
		baseMng = (StudentInfoMng) sm.getMng(GlobalCon.STUDENTINFO);
	}

	@SuppressWarnings("unchecked")
	public List<StudentInfo> findList(Class<StudentInfo> clazz) {
		return dateManage.findbyhql(getListHql(clazz)).list();
	}

	@Override
	public StudentInfo getObj() {
		return new StudentInfo();
	}

	public ActionForward addProcess(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.addProcess(mapping, form, request,
				response);
		dateManage.save(item);
		return serBean;
	}
}
